﻿CREATE TABLE [dbo].[RegimuriAlimentare] (
    [IDRegim]           INT             IDENTITY (1, 1) NOT NULL,
    [Denumire]          VARCHAR (50)    NOT NULL,
    [Tarif]             DECIMAL (18, 2) CONSTRAINT [DF_Regimuri_Tarif] DEFAULT ((0)) NOT NULL,
    [Preluat]           BIT             CONSTRAINT [DF_RegimuriAlimentare_Preluate] DEFAULT ((0)) NOT NULL,
    [IDRegimEchivalent] INT             NULL,
    CONSTRAINT [PK_Regimuri] PRIMARY KEY CLUSTERED ([IDRegim] ASC),
    CONSTRAINT [FK_RegimuriAlimentare_RegimuriAlimentare] FOREIGN KEY ([IDRegimEchivalent]) REFERENCES [dbo].[RegimuriAlimentare] ([IDRegim]),
    CONSTRAINT [IX_RegimuriAlimentare] UNIQUE NONCLUSTERED ([Denumire] ASC)
);

